"""
time模块中时间对象和字符串之间的转换
"""
import time

t1 = time.localtime()
format_time = time.strftime("%Y-%m-%d %H时%M分%S秒",t1)
print(format_time)
str_time = "2003年2月7日 12:00:00"
parsed_time = time.strptime(str_time,"%Y年%m月%d日 %H:%M:%S")
print(parsed_time)
time_tuple = (2025,5,13,0,0,0,0,0,0)
t3 = time.mktime(time_tuple)
print(t3)
t5 = time.strftime("%Y年%m月%d日 %H:%M:%S",time.localtime(t3))
print(t5)